package com.study.designpartten.single;

public class Singleton2 {

    private Singleton2(){}

    static class Layer{
        private static Singleton2 instance = new Singleton2();

        public static Singleton2 getInstance(){
            return instance;
        }
    }

    public static void main(String[] args) {
        Singleton2 s1 = Singleton2.Layer.getInstance();
        Singleton2 s2 = Singleton2.Layer.getInstance();
        System.out.println(s1==s2);
    }

}
